using System;
using System.Collections;
using System.Collections.Generic;
namespace Circus.Syntax.Lexer
{
	public class LexReswordSets : List<LexReswordSet>, IList<LexReswordSet>, ICollection<LexReswordSet>, IEnumerable<LexReswordSet>, IEnumerable
	{
		private LexSyntaxBlock block;
		public LexReswordSets(LexSyntaxBlock block)
		{
			this.block = block;
		}
		public virtual LexReswordSet AddLexReswordSet()
		{
			LexReswordSet lexReswordSet = new LexReswordSet(this.block);
			base.Add(lexReswordSet);
			return lexReswordSet;
		}
		public virtual LexReswordSet InsertLexReswordSet(int index)
		{
			LexReswordSet lexReswordSet = new LexReswordSet(this.block);
			base.Insert(index, lexReswordSet);
			return lexReswordSet;
		}
		public virtual int FindResword(string resword)
		{
			int result;
			for (int i = 0; i < base.Count; i++)
			{
				if (base[i].FindResword(resword))
				{
					result = i;
					return result;
				}
			}
			result = -1;
			return result;
		}
	}
}
